/**
 * @Description: test
 * @Author: Hu Outstanding
 * @Date: 2022/2/22 8:51
 */
package com.aaa.three.service.impl;

import com.aaa.three.mapper.AdminLogInfoMapper;
import com.aaa.three.pojo.domain.LogInfo;
import com.aaa.three.pojo.query.AdminLogInfoQuery;
import com.aaa.three.pojo.query.LogInfoQuery;
import com.aaa.three.result.AjaxResult;
import com.aaa.three.service.AdminLogInfoService;
import com.alibaba.excel.EasyExcel;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletResponse;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class AdminLogInfoServiceImpl implements AdminLogInfoService {


    @Autowired
    private AdminLogInfoMapper adminLogInfoMapper;

    @Override
    public AjaxResult queryLog(LogInfoQuery logInfoQuery)  {

        List<AdminLogInfoQuery> logInfos = adminLogInfoMapper.queryLog(logInfoQuery);
        Long along = adminLogInfoMapper.queryLogInfoTotal(logInfoQuery);
        HashMap<Object, Object> map = new HashMap<>();
        map.put("currentData",logInfos);
        map.put("totalCount",along);
        return AjaxResult.success(map);
        }

    @Override
    public AjaxResult getLog(int id) {

        AdminLogInfoQuery getLog = adminLogInfoMapper.getLog(id);
        return AjaxResult.success(getLog);
    }


}
